//
//  BCUserFingerPrintDeleteRequest.m
//  GSBlockChain
//
//  Created by guoshikeji_a on 2018/12/10.
//  Copyright © 2018 guoshikeji. All rights reserved.
//

#import "BCUserFingerPrintDeleteRequest.h"

@implementation BCUserFingerPrintDeleteRequest

- (HttpRequestMethod)requestMethod {
    return DELETE;
}
- (NSString *)relativelyUrl {
    return V1_User_Fingerprint;
}

- (NSString *)device_type {
    return @"2";
}
- (NSString *)uuid {
    return [GeneralParameterManager sharedGeneral].uuid;
}

- (BOOL)success:(NSURLSessionDataTask *)task data:(id)obj {
    BOOL success = [super success:task data:obj];
    if (success) {
        BCUserFingerPrintDeleteResponse *resp = [BCUserFingerPrintDeleteResponse yy_modelWithJSON:obj];
        /**
         删除指纹登录码 出keychai
         */
        [[BCUserLoginManager sharedLogin] deleteCurrentUserLocalAuthticationCode:[BCUserManager sharedUser].userLogin.user_id];
        if (self.requestSuccessed) {
            //
            self.requestSuccessed(resp, nil);
        }
    }
    return success;
}

@end
